On Ubuntu 24.04 (and other systems using PipeWire, I imagine), two-input devices have their inputs mixed together into a single stereo input. This is problematic if you want to use one input in one program without that program hearing the other input.
In my case this was so I could use a microphone in Discord and a radio transceiver audio output for
dsd-fme without sending one to the other. In your PipeWire config directory of choice, e.g.
~/.config/pipewire/pipewire.conf.d/, create a file called my-loopback-2.conf (the name isn't important).
Inside this file place the following:
context.modules = [
{ name = libpipewire-module-loopback
args = {
node.description = "Scarlett Focusrite Line LEFT"
capture.props = {
audio.position = [ FL ]
stream.dont-remix = true
node.target = "your_device_name"
node.passive = true
}
playback.props = {
node.name = "SF_mono_in_1"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
{ name = libpipewire-module-loopback
args = {
node.description = "Scarlett Focusrite Line RIGHT"
capture.props = {
audio.position = [ FR ]
stream.dont-remix = true
node.target = "your_device_name"
node.passive = true
}
playback.props = {
node.name = "SF_mono_in_2"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
]
You can find the device name to put in place of your_device_name (keep the quotes) with pactl list sources. For me,
with my Scarlett Solo in "Digital Stereo Duplex (IEC958)" mode in the pavucontrol configuration tab, my device is called "alsa_input.usb-Focusrite_Scarlett_Solo_USB_Y7D27ZN1C2B017-00.iec958-stereo".
After creating this config restart PipeWire and you should have two new devices, called Scarlett Focusrite Line LEFT/RIGHT representing the left and right inputs respectively.